<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>044-ajax3.html</title>
</head>
<body>
	<button>获取数据1</button>
	<button>获取数据2</button>
	<button>获取数据3</button>
</body>
<script src="js/jquery-1.12.4.js"></script>
<script>
	$(function(){
		$('button').eq(0).on('click',function(){
			$.get('044-data.json',{name:'Chris',age:24},function(data){
				console.log(data);
			},"json")
		});
		$('button').eq(1).on('click',function(){
			$.post('044-data.json',{name:'Chris',age:24},function(data){
				console.log(data);
			},"text")
		});
		$('button').eq(2).on('click',function(){
			$.getJSON('044-data.json',function(data){
				console.log(data);
			})
		});
	});
</script>
</html>